package com.atguigu02.memory;

/**
 * ClassName: PersonTest
 * Package: com.atguigu02.memory
 * Description:
 *
 * @Author xiao_qi
 * @Create 2024/3/16 21:30
 * @Version 1.0
 */
public class PersonTest {
    public static void main(String[] args){
        Person p1 = new Person();

        p1.age = 10;
        p1.gender = (String) "男";
        p1.name = "jaker";

        System.out.println("name = " + p1.name + ",age = " + p1.age +
                ", gender = " + p1.gender);

        p1.eat();
        p1.sleep(8);
        p1.interests("吃垃圾");
        Person p2 = new Person();
        p2.name = "露丝";
        p2.age = 18;
        p2.gender = (String) "女";


        System.out.println("name = " + p2.name + ",age = " + p2.age +
                ", gender = " + p2.gender);

        System.out.println("name = " + p1.name + ",age = " + p1.age +
                ", gender = " + p1.gender);


    }
}
